package tests.user;

/**
 * Copyright 2007, 2008 Viera K. Proulx
 * This program is distributed under the terms of the 
 * GNU Lesser General Public License (LGPL)
 */

/**
 * A sample abstract subclass to verify that tests include the common
 * field defined in the abstract class, as well as concrete methods
 * defined in the abstract class.
 *  
 * @author Viera K. Proulx
 * @since 29 October 2007
 */
public abstract class ALibItemCD extends ALibItem{
  public int noDisks;
  
    
  /**
   * Compare the length of the title against the author
   * --- example of an abstract method implemented in the concrete subclass
   * 
   * @return true if the title has the same length as the number of disks
   */
  public boolean sameLength(){
    return title.length() == this.noDisks;
  }
  
  /**
   * Does this CD collection have many CDs?
   * --- an example of a method not defined or declared in the superclass
   * 
   * @return true if the author of this book is the same as the given one
   */
  public boolean manyCDs(int cnt){
    return this.noDisks > cnt;
  }
}